<!DOCTYPE HTML>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="author" content="Bootstrap-ecommerce by Vosidiy">
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">

    <title>用户注册</title>

    <link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico">

    <!-- jQuery -->
    <script src="../js/jquery-2.0.0.min.js" type="text/javascript"></script>

    <!--layui-->
    <script src="/layui.js"></script>
    <link href="/css/layui.css" rel="stylesheet" type="text/css"/>

    <!-- Bootstrap4 files-->
    <script src="../js/bootstrap.bundle.min.js" type="text/javascript"></script>
    <link href="../css/bootstrap.css" rel="stylesheet" type="text/css">

    <!-- Font awesome 5 -->
    <link href="../fonts/fontawesome/css/fontawesome-all.min.css" type="text/css" rel="stylesheet">

    <!-- plugin: owl carousel  -->
    <link href="../plugins/owlcarousel/assets/owl.carousel.min.css" rel="stylesheet">
    <link href="../plugins/owlcarousel/assets/owl.theme.default.css" rel="stylesheet">
    <script src="../plugins/owlcarousel/owl.carousel.min.js"></script>

    <!-- custom style -->
    <link href="../css/ui.css" rel="stylesheet" type="text/css">
    <link href="../css/responsive.css" rel="stylesheet" media="only screen and (max-width: 1200px)">

    <!--adminLTE-->
    <!--<link rel="stylesheet" href="../AdminLTE-2.4.12/bower_components/bootstrap/dist/css/bootstrap.min.css">-->
    <!-- Ionicons -->
    <link rel="stylesheet" href="../AdminLTE-2.4.12/bower_components/Ionicons/css/ionicons.min.css">
    <!--jQuery验证-->
    <script src="http://static.runoob.com/assets/jquery-validation-1.14.0/lib/jquery.js"></script>
    <script src="http://static.runoob.com/assets/jquery-validation-1.14.0/dist/jquery.validate.min.js"></script>
    <script src="https://static.runoob.com/assets/jquery-validation-1.14.0/dist/localization/messages_zh.js"></script>


    <script src="/js/registerValidate.js"></script>
    <style>
        .error{
            color:red;
        }
    </style>

</head>
<body class="hold-transition">
<!-- ========================= HEADER ========================= -->
<header class="section-header">

    <section class="header-main shadow-sm">
        <div class="container">
            <div class="row-sm align-items-center">
                <div class="col-lg-7-24 col-sm-3">
                    <a class="navbar-brand" href="/index">
                        <img class="logo" src="/images/logos/logo-alibaba.png" alt="alibaba style e-commerce html template file" title="alibaba e-commerce html css theme">
                    </a>
                </div>
                <div class="col-lg-10-24 col-sm-8" style="text-align: center">
                    <span style="font-size: 35px;color: #ffc107 !important;">用户注册</span>
                </div>
                <div class="col-md-7-24 col-sm-12">
                    <div class="widgets-wrap float-right row no-gutters py-1">
                        <div class="col-auto">
                            <div class="widget-header dropdown" sec:authorize="isAnonymous()" >
                                <a href="#" data-toggle="dropdown" data-offset="20,10">
                                    <div class="icontext">
                                        <div class="icon-wrap"><i class="text-warning icon-sm fa fa-user"></i></div>
                                        <div class="text-wrap text-dark">
                                            登陆账号&nbsp&nbsp<i class="fa fa-caret-down"></i>
                                        </div>
                                    </div>
                                </a>
                                <div class="dropdown-menu">
                                    <form method="post" action="/index" class="px-4 py-3">
                                        <div class="form-group">
                                            <label>手机号</label>
                                            <input type="text" name="username" class="form-control" placeholder="手机号">
                                        </div>
                                        <div class="form-group">
                                            <label>密码</label>
                                            <input type="password" name="password" class="form-control" placeholder="密码">
                                        </div>
                                        <button type="submit" class="btn btn-primary">登录</button>
                                    </form>
                                    <hr class="dropdown-divider">
                                    <a class="dropdown-item" href="/user/register">没有账号？点此注册</a>
                                    <a class="dropdown-item" href="#">忘记密码？</a>
                                </div> <!--  dropdown-menu .// -->
                            </div>  <!-- widget-header .// -->
                            <div class="widget-header dropdown" sec:authorize="isAuthenticated()" >
                                <a href="#" data-toggle="dropdown" data-offset="20,10">
                                    <div class="icontext">
                                        <div class="icon-wrap"><i class="text-warning icon-sm fa fa-user"></i></div>
                                        <div class="text-wrap text-dark" sec:authentication="">
                                            <span th:text="${session.nickname}">您已登陆</span>&nbsp;&nbsp;<i class="fa fa-caret-down"></i>
                                        </div>
                                    </div>
                                </a>
                                <div class="dropdown-menu">
                                    <a class="dropdown-item" href="/userCenter">我的个人中心</a>
                                    <a class="dropdown-item" href="#">我的订单</a>
                                    <hr class="dropdown-divider">
                                    <a class="dropdown-item" href="/logout">注销登陆</a>
                                </div> <!--  dropdown-menu .// -->
                            </div>  <!-- widget-header .// -->
                        </div> <!-- col.// -->
                        <div class="col-auto">
                            <a href="#" class="widget-header">
                                <div class="icontext">
                                    <div class="icon-wrap"><i class="text-warning icon-sm fa fa-shopping-cart"></i></div>
                                    <div class="text-wrap text-dark">
                                        我的购物车
                                    </div>
                                </div>
                            </a>
                        </div> <!-- col.// -->
                        <!--注释掉愿望单-->
                        <!--<div class="col-auto">-->
                        <!--<a href="#" class="widget-header">-->
                        <!--<div class="icontext">-->
                        <!--<div class="icon-wrap"><i class="text-warning icon-sm  fa fa-heart"></i></div>-->
                        <!--<div class="text-wrap text-dark">-->
                        <!--<span class="small round badge badge-secondary">0</span>-->
                        <!--<div>Favorites</div>-->
                        <!--</div>-->
                        <!--</div>-->
                        <!--</a>-->
                        <!--</div> -->

                    </div> <!-- widgets-wrap.// row.// -->
                </div>
            </div> <!-- row.// -->
        </div> <!-- container.// -->
    </section> <!-- header-main .// -->
</header>
<!--<div th:replace="fragment::header"></div>-->
<section class="section-main bg padding-y-sm">
    <div class="container">
        <div class="card">
            <div class="card-body">

                <div class="row-sm"><br><br><br><br></div>
                <div class="row row-sm">
                    <div class="col-lg-8-24 col-sm-3"></div>
                    <!--注册框-->
                    <div class="col-lg-8-24 col-sm-3">
                            <div class="align-items-center">
                                <p style="text-align: center;color: #ffc107;font-size: 18px;">现在注册，开始您的购物之旅</p><br>

                                <form action="/user/register" method="post" class="align-items-center" id="regForm">
                                    <label style="color: red">*</label><label>手机号：</label>
                                    <input type="text" class="form-control" placeholder="Phone" name="phonenumber" autocomplete="off" id="Phone">
                                    <br>
                                    <label style="color: red">*</label><label>密码：</label>
                                    <input type="password" class="form-control" placeholder="Password" name="password" autocomplete="off" id="regPwd">
                                    <br>
                                    <label style="color: red">*</label><label>确认密码：</label>
                                    <input type="password" class="form-control" placeholder="Confirm Password" name="passwordconfirm" autocomplete="off" id="regPwdConfirm">
                                    <br>
                                    <label style="color: red">*</label><label>昵称：</label>
                                    <input type="text" class="form-control" placeholder="Nickname" name="nickname" autocomplete="off" id="regNickname">
                                    <br>
                                    <label>性别：</label>
                                    <br>
                                    <input type="radio" name="gender" value="男">  男&nbsp;&nbsp;&nbsp;&nbsp;
                                    <input type="radio" name="gender" value="女">  女&nbsp;&nbsp;&nbsp;&nbsp;
                                    <input type="radio" name="gender" value="保密" checked>  保密
                                    <br><br>
                                    <label style="color: red">*</label><label>收货人姓名：</label>
                                    <input type="text" class="form-control" placeholder="Name" name="recName" autocomplete="off" id="regName">
                                    <br>
                                    <label style="color: red">*</label><label>收货人电话：</label>
                                    <input type="text" class="form-control" placeholder="Phone" name="recPhone" autocomplete="off" id="regPhone">
                                    <br>
                                    <label style="color: red">*</label><label>收货地址：</label>
                                    <input type="text" class="form-control" placeholder="Address" name="recAddress" autocomplete="off" id="regAdd">
                                    <br>
                                    <label>职业：</label>
                                    <input type="text" class="form-control" placeholder="Occupation" name="occupation" autocomplete="off" id="occupation">
                                    <br>
                                    <label>爱好：</label>
                                    <input type="text" class="form-control" placeholder="Preference" name="preference" autocomplete="off" id="regPreference">
                                    <br>
                                    <label>生日：</label>
                                    <input type="text" class="form-control" placeholder="Birthday,like 1888-8-8" name="birthdate2" autocomplete="off" id="regBirth">
                                    <br><br><br>
                                    <div >
                                        <button type="submit" class="btn btn-primary btn-block btn-flat" style="background-color: #ffc107 !important;   border-color: yellow;">
                                            注册
                                        </button>
                                    </div>

                                </form>


                            </div>
                        <!--</form>-->
                    </div>
                    <div class="col-lg-8-24 col-sm-3"></div>
                </div>
                <div class="row-sm"><br><br><br><br><br><br><br><br></div>
            </div>
        </div>
    </div>
</section>

<div th:replace="fragment::footer"></div>
</body>
<script th:inline="javascript">
    $(document).ready(function () {
        layui.use('laydate', function(){
            var laydate = layui.laydate
            //执行一个laydate实例
            laydate.render({
                elem: '#regBirth', //指定元素
                value:[[${birthdate}]],
                theme: '#ffc107'
            });
        });
    })

</script>
</html>